home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / compress / gnucpio.zip / MAKEFILE.IN < prev    next >
Text File  |  1995-12-20  |  7KB  |  225 lines

  1. # Makefile for GNU cpio.
  2. # Copyright (C) 1990, 1991, 1993 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. #### Start of system configuration section. ####
  19.  
  20. srcdir = @srcdir@
  21. VPATH = @srcdir@
  22.  
  23. # If you use gcc, you should either run the fixincludes script that
  24. # comes with it or else use gcc with the -traditional option.  Otherwise
  25. # ioctl calls will be compiled incorrectly on some systems.
  26. CC = @CC@
  27.  
  28. # If you don't have a BSD or GNU install program, use cp.
  29. INSTALL = @INSTALL@
  30. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  31. INSTALL_DATA = @INSTALL_DATA@
  32.  
  33. # Things you might add to DEFS:
  34. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  35. # -DHAVE_UNISTD_H    If you have unistd.h.
  36. # -DHAVE_STRING_H    If you don't have ANSI C headers but have string.h.
  37. # -DHAVE_UTIME_H    If you have utime.h.
  38. # -DMAJOR_IN_MKDEV    If major, minor, makedev defined in sys/mkdev.h.
  39. # -DMAJOR_IN_SYSMACROS    If major, minor, makedev defined in sys/sysmacros.h.
  40. # -DHAVE_FCNTL_H    If not POSIX.1 but you have fcntl.h.
  41. # -DRETSIGTYPE=int    If your signal handlers return int, not void.
  42. # -DHAVE_LCHOWN        If you have lchown system call.
  43. # -DHAVE_STRERROR    If you have strerror function.
  44. # -DHAVE_VPRINTF    If you have vprintf function.
  45. # -DHAVE_DOPRNT        If you have _doprnt function (but lack vprintf).
  46. # -DHAVE_SYS_MTIO_H    If you have sys/mtio.h (magtape ioctls).
  47. # -DHAVE_SYS_GENTAPE_H    If you have sys/gentape.h (ISC magtape ioctls).
  48. # -DHAVE_NETDB_H    To use rexec for remote tape operations
  49. #            instead of forking rsh or remsh.
  50. # -DNO_REMOTE        If you have neither a remote shell nor rexec.
  51. # -DSYMLINK_USES_UMASK    If your symlink system call uses the value of
  52. #            umask to set the protection of symbolic links.
  53. # -DHPUX_CDF        If you are on an HP/UX system and want support
  54. #            for context dependent files.
  55.  
  56. DEFS = @DEFS@
  57. LIBS = @LIBS@
  58. # Set this to rtapelib.o unless you defined NO_REMOTE, in which case
  59. # make it empty.
  60. RTAPELIB = @RTAPELIB@
  61.  
  62. CFLAGS = @CFLAGS@
  63. LDFLAGS = @LDFLAGS@
  64.  
  65. prefix = @prefix@
  66. exec_prefix = @exec_prefix@
  67.  
  68. # Prefix for each installed program, normally empty or `g'.
  69. binprefix = 
  70. # Prefix for each installed man page, normally empty or `g'.
  71. manprefix = 
  72.  
  73.  
  74. # Where to install the cpio and mt executables.
  75. bindir = @bindir@
  76.  
  77. # Where to put the rmt executable.
  78. libexecdir = @libexecdir@
  79.  
  80. # Where to put the info 
  81. infodir = @infodir@
  82.  
  83. # Where to put the Unix-style manual pages.
  84. mandir = @mandir@/man1
  85. # Extension (not including `.') for the Unix-style manual page filenames.
  86. manext = 1
  87.  
  88. #### End of system configuration section. ####
  89.  
  90. SHELL = /bin/sh
  91.  
  92. MAKEINFO = makeinfo
  93. TEXI2DVI = texi2dvi
  94.  
  95. TEXFILES = *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.log *.pg *.toc *.tp *.vr
  96.  
  97. INFOS = cpio.info*
  98. INFO_DEPS = cpio.info
  99. DVIS = cpio.dvi
  100.  
  101. SRCS = copyin.c copyout.c copypass.c defer.c dstring.c global.c \
  102. main.c tar.c util.c error.c getopt.c getopt1.c filemode.c version.c \
  103. rtapelib.c dirname.c idcache.c makepath.c xmalloc.c stripslash.c \
  104. userspec.c xstrdup.c bcopy.c fnmatch.c mkdir.c strdup.c
  105. OBJS = copyin.o copyout.o copypass.o defer.o dstring.o global.o \
  106. main.o tar.o util.o error.o getopt.o getopt1.o filemode.o version.o \
  107. $(RTAPELIB) dirname.o idcache.o makepath.o xmalloc.o stripslash.o \
  108. userspec.o xstrdup.o @LIBOBJS@ @FNMATCH@ @ALLOCA@ 
  109. # mt source files not shared with cpio.
  110. MT_SRCS = mt.c argmatch.c
  111. MT_OBJS = mt.o argmatch.o error.o getopt.o getopt1.o \
  112. xmalloc.o version.o $(RTAPELIB) @ALLOCA@
  113. HDRS = cpio.h cpiohdr.h tar.h tarhdr.h defer.h dstring.h extern.h filetypes.h \
  114. system.h fnmatch.h getopt.h rmt.h safe-stat.h
  115. DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in \
  116. README NEWS INSTALL cpio.1 mt.1 makefile.pc makefile.os2 cpio.def \
  117. configure configure.in mkinstalldirs install-sh $(MT_SRCS) rmt.c tcexparg.c \
  118. alloca.c cpio.texi cpio.info texinfo.tex
  119.  
  120. all:    @PROGS@
  121.  
  122. .c.o:
  123.     $(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $<
  124.  
  125. install:: installdirs all $(srcdir)/cpio.1 $(srcdir)/mt.1
  126.     $(INSTALL_PROGRAM) cpio $(bindir)/$(binprefix)cpio
  127.     test ! -f mt || $(INSTALL_PROGRAM) mt $(bindir)/$(binprefix)mt
  128.     -test ! -f rmt || $(INSTALL_PROGRAM) rmt $(libexecdir)/rmt
  129.     -$(INSTALL_DATA) $(srcdir)/cpio.1 $(mandir)/$(manprefix)cpio.$(manext)
  130.     -test ! -f mt || $(INSTALL_DATA) $(srcdir)/mt.1 $(mandir)/$(manprefix)mt.$(manext)
  131.  
  132. installdirs:
  133.     $(srcdir)/mkinstalldirs $(bindir) $(libexecdir) $(mandir) $(infodir)
  134.  
  135. uninstall::
  136.     cd $(bindir); rm -f $(binprefix)cpio $(binprefix)mt
  137.     -rm -f $(libexecdir)/rmt
  138.     cd $(mandir); rm -f $(manprefix)cpio.$(manext) $(manprefix)mt.$(manext)
  139.  
  140. check:
  141.     @echo No tests are supplied.
  142.  
  143. cpio:    $(OBJS)
  144.     $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
  145.  
  146. copyin.o: cpio.h cpiohdr.h defer.h dstring.h extern.h filetypes.h fnmatch.h rmt.h system.h
  147. copyout.o: cpio.h cpiohdr.h defer.h dstring.h extern.h filetypes.h rmt.h system.h
  148. copypass.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h system.h
  149. defer.o: cpiohdr.h extern.h system.h
  150. dstring.o: dstring.h
  151. global.o: cpio.h cpiohdr.h dstring.h extern.h system.h
  152. main.o: cpio.h cpiohdr.h dstring.h extern.h filetypes.h rmt.h
  153. tar.o: filetypes.h cpio.h cpiohdr.h dstring.h extern.h rmt.h tar.h tarhdr.h system.h
  154. util.o: extern.h rmt.h system.h
  155. mt.o: rmt.h
  156.  
  157. rmt:    rmt.o
  158.     $(CC) $(LDFLAGS) -o $@ rmt.o $(LIBS)
  159.  
  160. mt:    $(MT_OBJS)
  161.     $(CC) $(LDFLAGS) -o $@ $(MT_OBJS) $(LIBS)
  162.  
  163. Makefile: Makefile.in config.status
  164.     $(SHELL) config.status
  165. config.status: configure
  166.     $(SHELL) config.status --recheck
  167. configure: configure.in
  168.     cd $(srcdir); autoconf
  169.  
  170. TAGS:    $(SRCS)
  171.     etags $(SRCS)
  172.  
  173. .SUFFIXES: .texi .info .dvi
  174.  
  175. .texi.info:
  176.     $(MAKEINFO) -I$(srcdir) $<
  177.  
  178. .texi.dvi:
  179.     TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
  180.  
  181. info:: $(INFO_DEPS)
  182.  
  183. dvi:: $(DVIS)
  184.  
  185. install:: install-info
  186.  
  187. install-info: $(INFO_DEPS)
  188.     cd $(srcdir); for file in *.info*; do \
  189.       $(INSTALL_DATA) $$file $(infodir)/$$file; \
  190.     done
  191.  
  192. uninstall:: uninstall-info
  193.  
  194. uninstall-info:
  195.     cd $(srcdir); for file in *.info*; do \
  196.       rm -f $(infodir)/$$file; \
  197.     done
  198.  
  199. clean:
  200.     rm -f cpio rmt mt *.o core
  201.  
  202. mostlyclean: clean
  203.  
  204. distclean: clean
  205.     rm -f Makefile config.status config.log cpio.info
  206.  
  207. maintainer-clean: distclean
  208.     @echo "This command is intended only for maintainers to use;"
  209.     @echo "rebuilding the deleted files may require special tools."
  210.     rm -f TAGS
  211.  
  212. dist: $(DISTFILES)
  213.     echo cpio-`sed -e '/version_string/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
  214.     rm -rf `cat .fname`
  215.     mkdir `cat .fname`
  216.     -ln $(DISTFILES) `cat .fname`
  217.     for file in $(DISTFILES); do \
  218.       test -r `cat .fname`/$$file || cp -p $$file `cat .fname`; \
  219.     done
  220.     tar chzf `cat .fname`.tar.gz `cat .fname`
  221.     rm -rf `cat .fname` .fname
  222.  
  223. # Prevent GNU make v3 from overflowing arg limit on SysV.
  224. .NOEXPORT:
  225.